package com.ss.whisper2.pojo;

public enum State {
    MESSAGE(100,"普通消息"),
    SUCCESS_SELECT(101,"成功选择该门课程"),
    FAIL_SELECT(102,"选课失败"),
    NO_REST(103,"课程余量不足"),
    SUCCESS(200,"成功"),
    EMPTY(400,"必填信息不能为空"),
    EMPTY_USER(401,"该账号尚未注册"),
    ERROR_PASSWORD(402,"密码错误"),
    DUPLICATE_SELECT(403,"已经选过该课程"),
    ERROR(500,"服务器内部错误");
    private int code;
    private String msg;
    State(int code,String msg) {
        this.code=code;
        this.msg=msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    @Override
    public String toString() {
        return "State{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                '}';
    }
}
